﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common
{
    /// <summary>
    /// 系统静态常量
    /// </summary>
    public static class SystemConstConfig
    {
        /// <summary>
        /// 获取缓存有效时长
        /// </summary>
        public static DateTime ExpiressAbsoulte 
        {
            get 
            {
                return DateTime.Now.AddHours(CacheExpiress);
            } 
        }

        /// <summary>
        /// 最大登录失败次数
        /// </summary>
        public const int FailLoginCount = 5;

        /// <summary>
        /// 登录次数缓存Key
        /// </summary>
        public const string AdminLoginCount = "AdminLoginCount";

        /// <summary>
        /// 登录锁时间（分钟）
        /// </summary>
        public const int FailLoginTime = 10;

        /// <summary>
        /// 缓存有效时长(小时)
        /// </summary>
        public const int CacheExpiress = 12;

        /// <summary>
        /// 验证头
        /// </summary>
        public const string AuthHeader = "Auth";

        /// <summary>
        /// Lookchem登录SessionKey
        /// </summary>
        public const string LookchemLogin = "LookchemLogin";

        /// <summary>
        /// 网站信息缓存Key
        /// </summary>
        public const string CacheWebElement = "WebElement";

        /// <summary>
        /// 网站语言缓存Key
        /// </summary>
        public const string CacheLanguageType = "LanguageType";

        /// <summary>
        /// 中英文对照缓存Key
        /// </summary>
        public const string LanguageText = "LanguageText";

        /// <summary>
        /// 首页信息缓存Key
        /// </summary>
        public const string WebHomeKey = "WebHome";

        /// <summary>
        /// 网站栏目缓存Key
        /// </summary>
        public const string ContentClassKey = "ContentClass";

        /// <summary>
        /// 首页Banner缓存Key
        /// </summary>
        public const string BannerKey = "Banner";


        /// <summary>
        /// 友情链接缓存Key
        /// </summary>
        public const string FriendLinkKey = "FriendLink";

        /// <summary>
        /// 验证码Sessionkey 
        /// </summary>
        public const string Verification = "Verification";

        /// <summary>
        /// 新闻缓存Key
        /// </summary>
        public const string News = "News";

        /// <summary>
        /// 产品缓存Key
        /// </summary>
        public const string Products = "Products";

        /// <summary>
        /// 网站验证缓存key
        /// </summary>
        public const string WebValidKey = "VabValidKey";
    }
}
